diff -up hplip-3.17.11/scan.py.jpeg-compression hplip-3.17.11/scan.py
--- hplip-3.17.11/scan.py.jpeg-compression	2018-01-08 09:26:42.547072815 +0100
+++ hplip-3.17.11/scan.py	2018-01-08 09:29:39.753604411 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
 # -*- coding: utf-8 -*-
 #
 # (c) Copyright 2003-2015 HP Development Company, L.P.
@@ -1079,6 +1079,7 @@ try:
             log.info("Saving to file %s" % output)
 
             try:
+                im = im.convert("RGB")
                 im.save(output)
             except IOError as e:
                 log.error("Error saving file: %s (I/O)" % e)
